package com.zzs.server.pojo.query;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zzs
 * @date 2025/03/18
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ProblemQuery {
    @NotNull(message = "必须指定页面大小")
    @Min(value = 1, message = "页面大小必须大于0")
    private Integer pageSize = 10;

    @NotNull(message = "必须指定页码")
    @Min(value = 1, message = "页码必须大于0")
    private Integer pageNum = 1;

    @Min(value = 1, message = "难度区间: 简单, 中等, 困难")
    @Max(value = 3, message = "难度区间: 简单, 中等, 困难")
    private Integer difficulty = null;

    private String keyword;
}
